import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

export type AIContentDocumentType = HydratedDocument<AIContent>;

export interface AIInfo {
  content: string;
  role: string;
  status: number;
}
@Schema()
export class AIContent {
  @Prop({ required: true })
  user_id: string;

  @Prop({ required: true })
  time: number;

  @Prop({required: true,type: [Object],}) // 使用 Object 类型，而不是具体的对象结构
  list: AIInfo[]; // 使用 AIInfo 类型定义数组中的元素
}

export const AIContentSchema = SchemaFactory.createForClass(AIContent);
